package com.paradogs.framework.core.utils;

/**
 * @author: yumi
 * @date: 2023/8/15  16:07
 * @Description: 路由解析工具
 */
public class RouteUtils {

    /**
     * 服务名分隔符
     */
    public static final String SERVER_SEPARATOR = "|";

    public static String getServer(String route) {
        return route.substring(0, route.indexOf(RouteUtils.SERVER_SEPARATOR));
    }

    public static String getPath(String route) {
        return route.substring(route.indexOf(RouteUtils.SERVER_SEPARATOR) + 1);
    }

}
